#####################################################################
#																	 
#	Created by u'nSP IDE		10:17:59	05/04/20
#
#####################################################################




APPDIR	= D:\PROGRA~2\Sunplus\UNSPID~1.0

OUTDIR	= .\Debug

CC	= $(APPDIR)\gcc

AS	= $(APPDIR)\xasm16

LD	= $(APPDIR)\xlink16

AR	= $(APPDIR)\xLib16

RESC	= $(APPDIR)\resc

RM	= $(APPDIR)\rm -f

INCLUDES	= -I"E:/Gitee/SPCE061A/UART"

BODY	= -body SPCE060A_061A -bfile "D:\Program Files (x86)\Sunplus\unSP IDE Common\Body\SPCE060A_061A.cpt"

BINFILE	= "$(OUTDIR)\UART.S37"

ARYFILE	= "$(OUTDIR)\UART.ary"

SBMFILE	= "$(OUTDIR)\UART.sbm"

OPT	= -S -gstabs -mglobal-var-iram

ASFLAGS	= -t2 -d

CASFLAGS	= -t2 

CFLAGS	= $(OPT) -B$(APPDIR)\ $(INCLUDES) 

BINTYPE	= -as

LDFLAGS	= 

EXTRAFLAGS	= 


OBJFILES	= \
	"$(OUTDIR)\Resource.obj" \
	"$(OUTDIR)\main.obj" \
	"$(OUTDIR)\uart.obj" \
	"$(OUTDIR)\key.obj" \
	"$(OUTDIR)\delay.obj" \
	"$(OUTDIR)\oled.obj" \
	"$(OUTDIR)\myiic.obj" \
	"$(OUTDIR)\sysClock.obj" \
	"$(OUTDIR)\sio.obj" \
	"$(OUTDIR)\isr.obj" \
	"$(OUTDIR)\adc.obj" \
	"$(OUTDIR)\relay.obj" 

"$(OUTDIR)\Resource.obj": "E:\Gitee\SPCE061A\UART\Resource.asm" 
	$(AS) $(ASFLAGS) $(INCLUDES) -l "$(OUTDIR)\Resource.lst" -o "$(OUTDIR)\Resource.obj" "E:\Gitee\SPCE061A\UART\Resource.asm" 

"$(OUTDIR)\main.asm": "E:\Gitee\SPCE061A\UART\main.c" ".\SPCE061V004.H" ".\uart.h" ".\delay.h" ".\key.h" ".\sio.h" ".\adc.h" ".\relay.h" ".\oled.h" 
	$(CC) $(CFLAGS) -o "$(OUTDIR)/main.asm" "E:/Gitee/SPCE061A/UART/main.c" 

"$(OUTDIR)\main.obj": "$(OUTDIR)\main.asm"
	$(AS) $(CASFLAGS) $(INCLUDES) -l "$(OUTDIR)\main.lst" -o "$(OUTDIR)\main.obj" "$(OUTDIR)\main.asm" 

"$(OUTDIR)\uart.asm": "E:\Gitee\SPCE061A\UART\uart.c" ".\UART.h" ".\SPCE061V004.H" 
	$(CC) $(CFLAGS) -o "$(OUTDIR)/uart.asm" "E:/Gitee/SPCE061A/UART/uart.c" 

"$(OUTDIR)\uart.obj": "$(OUTDIR)\uart.asm"
	$(AS) $(CASFLAGS) $(INCLUDES) -l "$(OUTDIR)\uart.lst" -o "$(OUTDIR)\uart.obj" "$(OUTDIR)\uart.asm" 

"$(OUTDIR)\key.asm": "E:\Gitee\SPCE061A\UART\key.c" ".\key.h" ".\SPCE061V004.H" 
	$(CC) $(CFLAGS) -o "$(OUTDIR)/key.asm" "E:/Gitee/SPCE061A/UART/key.c" 

"$(OUTDIR)\key.obj": "$(OUTDIR)\key.asm"
	$(AS) $(CASFLAGS) $(INCLUDES) -l "$(OUTDIR)\key.lst" -o "$(OUTDIR)\key.obj" "$(OUTDIR)\key.asm" 

"$(OUTDIR)\delay.asm": "E:\Gitee\SPCE061A\UART\delay.c" ".\delay.h" ".\SPCE061V004.H" 
	$(CC) $(CFLAGS) -o "$(OUTDIR)/delay.asm" "E:/Gitee/SPCE061A/UART/delay.c" 

"$(OUTDIR)\delay.obj": "$(OUTDIR)\delay.asm"
	$(AS) $(CASFLAGS) $(INCLUDES) -l "$(OUTDIR)\delay.lst" -o "$(OUTDIR)\delay.obj" "$(OUTDIR)\delay.asm" 

"$(OUTDIR)\oled.asm": "E:\Gitee\SPCE061A\UART\oled.c" ".\oled.h" ".\SPCE061V004.H" ".\myiic.h" ".\codetab.h" ".\sio.h" 
	$(CC) $(CFLAGS) -o "$(OUTDIR)/oled.asm" "E:/Gitee/SPCE061A/UART/oled.c" 

"$(OUTDIR)\oled.obj": "$(OUTDIR)\oled.asm"
	$(AS) $(CASFLAGS) $(INCLUDES) -l "$(OUTDIR)\oled.lst" -o "$(OUTDIR)\oled.obj" "$(OUTDIR)\oled.asm" 

"$(OUTDIR)\myiic.asm": "E:\Gitee\SPCE061A\UART\myiic.c" ".\myiic.h" ".\SPCE061V004.H" 
	$(CC) $(CFLAGS) -o "$(OUTDIR)/myiic.asm" "E:/Gitee/SPCE061A/UART/myiic.c" 

"$(OUTDIR)\myiic.obj": "$(OUTDIR)\myiic.asm"
	$(AS) $(CASFLAGS) $(INCLUDES) -l "$(OUTDIR)\myiic.lst" -o "$(OUTDIR)\myiic.obj" "$(OUTDIR)\myiic.asm" 

"$(OUTDIR)\sysClock.asm": "E:\Gitee\SPCE061A\UART\sysClock.c" ".\sysClock.h" ".\SPCE061V004.H" 
	$(CC) $(CFLAGS) -o "$(OUTDIR)/sysClock.asm" "E:/Gitee/SPCE061A/UART/sysClock.c" 

"$(OUTDIR)\sysClock.obj": "$(OUTDIR)\sysClock.asm"
	$(AS) $(CASFLAGS) $(INCLUDES) -l "$(OUTDIR)\sysClock.lst" -o "$(OUTDIR)\sysClock.obj" "$(OUTDIR)\sysClock.asm" 

"$(OUTDIR)\sio.asm": "E:\Gitee\SPCE061A\UART\sio.c" ".\sio.h" ".\SPCE061V004.H" 
	$(CC) $(CFLAGS) -o "$(OUTDIR)/sio.asm" "E:/Gitee/SPCE061A/UART/sio.c" 

"$(OUTDIR)\sio.obj": "$(OUTDIR)\sio.asm"
	$(AS) $(CASFLAGS) $(INCLUDES) -l "$(OUTDIR)\sio.lst" -o "$(OUTDIR)\sio.obj" "$(OUTDIR)\sio.asm" 

"$(OUTDIR)\isr.asm": "E:\Gitee\SPCE061A\UART\isr.c" ".\SPCE061V004.H" ".\key.h" 
	$(CC) $(CFLAGS) -o "$(OUTDIR)/isr.asm" "E:/Gitee/SPCE061A/UART/isr.c" 

"$(OUTDIR)\isr.obj": "$(OUTDIR)\isr.asm"
	$(AS) $(CASFLAGS) $(INCLUDES) -l "$(OUTDIR)\isr.lst" -o "$(OUTDIR)\isr.obj" "$(OUTDIR)\isr.asm" 

"$(OUTDIR)\adc.asm": "E:\Gitee\SPCE061A\UART\adc.c" ".\adc.h" ".\SPCE061V004.H" 
	$(CC) $(CFLAGS) -o "$(OUTDIR)/adc.asm" "E:/Gitee/SPCE061A/UART/adc.c" 

"$(OUTDIR)\adc.obj": "$(OUTDIR)\adc.asm"
	$(AS) $(CASFLAGS) $(INCLUDES) -l "$(OUTDIR)\adc.lst" -o "$(OUTDIR)\adc.obj" "$(OUTDIR)\adc.asm" 

"$(OUTDIR)\relay.asm": "E:\Gitee\SPCE061A\UART\relay.c" ".\relay.h" ".\SPCE061V004.H" 
	$(CC) $(CFLAGS) -o "$(OUTDIR)/relay.asm" "E:/Gitee/SPCE061A/UART/relay.c" 

"$(OUTDIR)\relay.obj": "$(OUTDIR)\relay.asm"
	$(AS) $(CASFLAGS) $(INCLUDES) -l "$(OUTDIR)\relay.lst" -o "$(OUTDIR)\relay.obj" "$(OUTDIR)\relay.asm" 


.SUFFIXES : .c .asm .obj .s37 .tsk .res

all :	 "$(OUTDIR)" $(BINFILE)

"$(OUTDIR)" :
	if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"

$(BINFILE) : $(OBJFILES) 
	$(LD) $(BINTYPE) $(ARYFILE) $(BINFILE) $(LDFLAGS) $(BODY) $(EXTRAFLAGS)

compile :	 $(OBJFILES)

clean :
	$(RM) "$(OUTDIR)\Resource.obj" 
	$(RM) "$(OUTDIR)\Resource.lst" 
	$(RM) "$(OUTDIR)\main.obj" 
	$(RM) "$(OUTDIR)\main.lst" 
	$(RM) "$(OUTDIR)\main.asm" 
	$(RM) "$(OUTDIR)\uart.obj" 
	$(RM) "$(OUTDIR)\uart.lst" 
	$(RM) "$(OUTDIR)\uart.asm" 
	$(RM) "$(OUTDIR)\key.obj" 
	$(RM) "$(OUTDIR)\key.lst" 
	$(RM) "$(OUTDIR)\key.asm" 
	$(RM) "$(OUTDIR)\delay.obj" 
	$(RM) "$(OUTDIR)\delay.lst" 
	$(RM) "$(OUTDIR)\delay.asm" 
	$(RM) "$(OUTDIR)\oled.obj" 
	$(RM) "$(OUTDIR)\oled.lst" 
	$(RM) "$(OUTDIR)\oled.asm" 
	$(RM) "$(OUTDIR)\myiic.obj" 
	$(RM) "$(OUTDIR)\myiic.lst" 
	$(RM) "$(OUTDIR)\myiic.asm" 
	$(RM) "$(OUTDIR)\sysClock.obj" 
	$(RM) "$(OUTDIR)\sysClock.lst" 
	$(RM) "$(OUTDIR)\sysClock.asm" 
	$(RM) "$(OUTDIR)\sio.obj" 
	$(RM) "$(OUTDIR)\sio.lst" 
	$(RM) "$(OUTDIR)\sio.asm" 
	$(RM) "$(OUTDIR)\isr.obj" 
	$(RM) "$(OUTDIR)\isr.lst" 
	$(RM) "$(OUTDIR)\isr.asm" 
	$(RM) "$(OUTDIR)\adc.obj" 
	$(RM) "$(OUTDIR)\adc.lst" 
	$(RM) "$(OUTDIR)\adc.asm" 
	$(RM) "$(OUTDIR)\relay.obj" 
	$(RM) "$(OUTDIR)\relay.lst" 
	$(RM) "$(OUTDIR)\relay.asm" 
	$(RM) $(BINFILE) $(SBMFILE) 

.c.asm:
	$(CC) $(CFLAGS) $(INCLUDES) -o "$(OUTDIR)/$@" $<

.asm.obj:
	$(AS) $(ASFLAGS) $(INCLUDES) -o "$(OUTDIR)/$@" $<

